package itime

import (
	"time"
)

var (
	FORMAT_yyyy_MM_DD              = "2000-01-01"
	FORMAT_yyyy_MM_DD_HH_mm_ss     = "2000-01-01 00:00:00"
	FORMAT_yyyy_MM_DD_HH_mm_ss_sss = "2000-01-01 00:00:00.000"
)

// Now 获取当前时间
func Now() time.Time {
	return time.Now()
}

// NowUnix Unix 时间戳
func NowUnix() int64 {
	return time.Now().Unix()
}

// Format 时间格式化
func Format(t time.Time, format string) string {
	return t.Format(format)
}

// Parse 时间强转
func Parse(dt string, format string) (time.Time, error) {
	return time.Parse(format, dt)
}

// Add 新增时间
func Add(t time.Time, duration time.Duration) time.Time {
	return t.Add(duration)
}
